﻿-- 获取指定角色对应的菜单
CREATE proc [dbo].[proc_AppRolesMenu_GetList]
(
	@RoleId int
)
as
	select 
		AM.Title,
		ARM.id,
		ARM.RoleId,
		ARM.MenuId,
		AM.ParentId,
		isnull((select AC.CName from AppController AC where AM.Cid = AC.Id),'') as ControllerName,
		isnull((select AA.AName from AppAction AA where AM.Aid = AA.Id),'') as ActionName
		 
	from 
		AppRolesMenu  ARM
		inner join AppMenu AM on ARM.MenuId=AM.MenuId
	where ARM.RoleId = @RoleId
